<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html ng-app="treeGridTest">

<head>

<title>类别管理</title>

<link
	href="${pageContext.request.contextPath }/css/bootstrap.min.css?v=3.3.6"
	rel="stylesheet">
<link
	href="${pageContext.request.contextPath }/css/font-awesome.css?v=4.4.0"
	rel="stylesheet">
<link
	href="${pageContext.request.contextPath }/css/plugins/iCheck/custom.css"
	rel="stylesheet">

<!-- treegrid -->
<link
	href="${pageContext.request.contextPath }/css/plugins/treegrid/treegrid.css"
	rel="stylesheet">

<!-- Sweet Alert -->
<link
	href="${pageContext.request.contextPath }/css/plugins/sweetalert/sweetalert.css"
	rel="stylesheet">

<!-- chosen -->
<link
	href="${pageContext.request.contextPath }/css/plugins/chosen/bootstrap-chosen.css"
	rel="stylesheet">

<link href="${pageContext.request.contextPath }/css/animate.css"
	rel="stylesheet">
<link href="${pageContext.request.contextPath }/css/style.css?v=4.1.0"
	rel="stylesheet">


<link
	href="${pageContext.request.contextPath }/css/plugins/bootstrap-table/bootstrap-table.min.css"
	rel="stylesheet">
<link
	href="${pageContext.request.contextPath }/css/plugins/toastr/toastr.min.css"
	rel="stylesheet">
	
	
<link href="${pageContext.request.contextPath }/myCss/common.css" rel="stylesheet">
</head>

<body ng-controller="treeGridController" class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">

		<div class="row">
			<!-- 菜单管理 -->
			<div class="col-sm-12">
				<div class="ibox">
					<div class="ibox-content">
						<div class="tab-content" ng-controller="addCategory">
							<h2>类别管理</h2>
							<div style="height: 20px"></div>
							
							<button class="btn btn-primary btn-sm" ng-click="addCategory()">
								<i class="fa fa-plus"></i> 新增类别
							</button>
							<button ng-click="my_tree.expand_all()"
								class="btn btn-primary btn-sm">
								<i class="fa fa-plus"></i>展开全部
							</button>
							<button ng-click="my_tree.collapse_all()"
								class="btn btn-primary btn-sm">
								<i class="fa fa-remove"></i>关闭全部
							</button>
							<div class="col-sm-2 pull-right">
								<input class="input-sm  form-control" type="text"
									data-ng-model="filterString" placeholder="搜索" />
							</div>
							<tree-grid tree-data="tree_data" tree-control="my_tree"
								col-defs="col_defs" expand-on="expanding_property"
								on-select="my_tree_handler(branch)" expand-level="2"
								icon-leaf="glyphicon glyphicon-globe"> </tree-grid>

						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	
	
	<!-- 类别详情弹出框开始 -->
    <div class="modal inmodal fade" id="categoryDetailModal" tabindex="-1"
				role="dialog" aria-hidden="true">
		<div class="modal-dialog"><!-- modal-lg -->
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal">
						<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
					</button>
					<h4 class="modal-title">类别详情</h4>
				</div>
				<div class="modal-body">
					<div class="row">
						<div class="col-sm-12">
							<div class="col-sm-1"></div>
							<div class="col-sm-10" id="categoryDetailShow">
							
							</div>
						</div>
					</div>
				</div>

				<div class="modal-footer">
					<button type="button" class="btn btn-primary" data-dismiss="modal">关闭</button>
				</div>
			</div>
		</div>
	</div>
	<!-- 类别详情弹出框结束 -->

    <!-- 新增类别的弹出框 -->
	<div class="modal inmodal" id="addCategoryModal" tabindex="-1"
		role="dialog" aria-hidden="true" >
		<div class="modal-dialog">
			<div class="modal-content animated fadeIn">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal">
						<span aria-hidden="true">&times;</span><span class="sr-only">关闭</span>
					</button>
					<h4 class="modal-title">新增类别</h4>
				</div>
				<div class="row">
					<div class="col-sm-12">
						<div class="ibox float-e-margins">
							<div class="ibox-content">
								<form class="form-horizontal" id="addCategoryForm">
									<div class="form-group">
										<label class="col-sm-4 control-label">父级类别：</label>
										<div class="col-sm-6" id="bsSuggestArea">
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-4 control-label">类别名称：</label>
										<div class="col-sm-6">
											<input name="categoryName" class="form-control input-sm"  >
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-4 control-label">类别描述：</label>
										<div class="col-sm-6">
											<textarea class="form-control" name="categoryDesc" ></textarea>
										</div>
									</div>

								</form>
							</div>
						</div>
					</div>
				</div>
				<div class="modal-footer" ng-controller="addCategorySaveController">
					<button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
					<button type="button" class="btn btn-primary" ng-click="saveCategory()">保存</button>
				</div>
			</div>
		</div>
	</div>
	<!-- 新增类别的弹出框结束 -->

	<!-- 修改类别的弹出框开始 -->
	<div class="modal inmodal" id="updateCategoryModal" tabindex="-1"
		role="dialog" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content animated fadeIn">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal">
						<span aria-hidden="true">&times;</span><span class="sr-only">关闭</span>
					</button>
					<h4 class="modal-title">修改类别</h4>
				</div>
				<div class="row">
					<div class="col-sm-12">
						<div class="ibox float-e-margins">
							<div class="ibox-content">
								<form class="form-horizontal" id="updateCategoryForm"
									enctype="application/x-www-form-urlencoded">
									<input type="hidden" id="updateCategoryId" name="id" />
									<div class="form-group">
										<label class="col-sm-4 control-label">类别名：</label>
										<div class="col-sm-6">
											<input type="text" name="categoryName"
												class="form-control input-sm" required="required">
										</div>
									</div>
									<input type="hidden" id="testNoBtn" name="parentCategoryId" />
									<div class="form-group">
										<label class="col-sm-4 control-label">类别描述：</label>
										<div class="col-sm-6">
											<textarea rows="" cols="" class="form-control"
												name="categoryDesc" required="required"></textarea>
										</div>
									</div>

								</form>
							</div>
						</div>
					</div>
				</div>
				<div class="modal-footer" ng-controller="UpdateCategorySaveController">
					<button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
					<button type="button" class="btn btn-primary" ng-click="updateCategorySave()">保存</button>
				</div>
				
			</div>
		</div>
	</div>
	<!-- 修改角色的弹出框结束 -->

	<!-- 全局js -->
	<script
		src="${pageContext.request.contextPath }/js/jquery.min.js?v=2.1.4"></script>
	<script
		src="${pageContext.request.contextPath }/js/bootstrap.min.js?v=3.3.6"></script>


	<!-- iCheck -->
	<script
		src="${pageContext.request.contextPath }/js/plugins/iCheck/icheck.min.js"></script>
	<script>
		$(document).ready(function() {
			$('.i-checks').iCheck({
				checkboxClass : 'icheckbox_square-green',
				radioClass : 'iradio_square-green',
			});
		});
	</script>

	<!-- bootstr表格插件 -->
	<script
		src="${pageContext.request.contextPath }/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
	<script
		src="${pageContext.request.contextPath }/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
	<script
		src="${pageContext.request.contextPath }/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>

	<!-- 表单验证插件   -->
	<script
		src="${pageContext.request.contextPath }/js/plugins/validate/jquery.validate.js"></script>
	<script
		src="${pageContext.request.contextPath }/js/plugins/validate/messages_zh.min.js"></script>


	<!-- 通知插件 -->
	<script
		src="${pageContext.request.contextPath }/js/plugins/sweetalert/sweetalert.min.js"></script>
	<script
		src="${pageContext.request.contextPath }/js/plugins/toastr/toastr.min.js"></script>

	<!-- 格式化时间 -->
	<script src="${pageContext.request.contextPath }/js/plugins/moment.js"></script>

	<!-- Chosen多选插件 -->
	<script
		src="${pageContext.request.contextPath }/js/plugins/chosen/chosen.jquery.js"></script>

	<!-- angular插件 -->
	<script src="${pageContext.request.contextPath }/js/angular.js"></script>
   
	<!-- treegrid插件 -->
	<script
		src="${pageContext.request.contextPath }/js/plugins/treegrid/tree-grid-directive.js"></script>

	
	<!-- 搜索建议 -->
	<script src="${pageContext.request.contextPath }/js/plugins/suggest/bootstrap-suggest.min.js"></script>

	<!-- 自己的 -->
	<script src="${pageContext.request.contextPath }/myJs/common.js"></script>
	<script src="${pageContext.request.contextPath }/myJs/info/device/category.js"></script>
</body>

</html>
